<!DOCTYPE html PUBLIC 
	"-//W3C//DTD XHTML 1.1 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	
<%@taglib prefix="s" uri="/struts-tags" %>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>Units</title>
	<s:head />
</head>
<body>
	<table border="1" cellspacing="0" cellpadding="1">
		<tr>
			<th><s:text name="unit.title" /></th>
			<th><s:text name="unit.author" /></th>
			<th><s:text name="unit.type" /></th>
			<th><s:text name="unit.create" /></th>
		</tr>
		<s:iterator value="resources" status="rowstatus">
			<s:if test="#rowstatus.odd == true">
				<tr style="background: grey">
					<td><s:property value="shortTitle" /></td>
					<td><s:property value="makeAuthor()" /></td>
					<td><s:property value="type" /></td>
					<td>
						<s:url id="createUnit" action="create" namespace="/unit" includeParams="none">
								<s:param name="resourceId" value="id"/>
						</s:url>
						<a href="${createUnit}"><s:text name="unit.create" /></a>
					</td>
				</tr>
			</s:if>
			<s:else>
				<tr>
					<td><s:property value="shortTitle" /></td>
					<td><s:property value="makeAuthor()" /></td>
					<td><s:property value="type" /></td>
					<td>
						<s:url id="createUnit" action="create" namespace="/unit" includeParams="none">
								<s:param name="resourceId" value="id"/>
						</s:url>
						<a href="${createUnit}"><s:text name="unit.create" /></a>
					</td>
				</tr>
			</s:else>
		</s:iterator>
	</table>
</body>
</html>